# !/usr/bin/python
# _*_ conding : utf-8 _*_
# FileName : gzip_compress.py

import gzip

# content = 'hello python gzip!'
fp_in = open( 'file.txt', 'rb' )

fp = gzip.open( 'gzip', 'wb' )

# fp.write( content )
fp.writelines( fp_in )

fp.close()
fp_in.close()